package com.techwells.learningkites.adapter;

import java.util.List;

import com.techwells.learningkites.R;
import com.techwells.learningkites.controller.LoginActivity;
import com.techwells.learningkites.controller.MainPageActivity;
import com.techwells.taco.mvvm.Route;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;

public class ViewPagerAdapter extends PagerAdapter {
	
	private Activity mContext;
	private List<View> mList;
	

	public ViewPagerAdapter(Activity mContext,List<View> mList) {
		this.mList = mList;
		this.mContext = mContext;
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return mList.size();
	}

	@Override
	public boolean isViewFromObject(View arg0, Object arg1) {
		// TODO Auto-generated method stub
		return arg0 == arg1;
	}

	
	@Override  
    public void destroyItem(View view, int position, Object object) {  
        // TODO Auto-generated method stub  
		((ViewPager) view).removeView(mList.get(position));
    }  

    @Override  
    public Object instantiateItem(View view, int position) { 
    	
        // TODO Auto-generated method stub 
    	((ViewPager) view).addView(mList.get(position));
        return mList.get(position);   
    }  

}
